<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddPatnerRankingToSystemSwitchs extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('system_switches', function (Blueprint $table) {
            //
            $table->boolean('partner_rebate_ranking')->default(0);
            $table->boolean('partner_money_ranking')->default(0);
            $table->boolean('partner_number_ranking')->default(0);
            $table->boolean('partner_photo_ranking')->default(0);
            $table->boolean('partner_jewelry_ranking')->default(0);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('system_switches', function (Blueprint $table) {
            //
            $table->dropColumn(['partner_rebate_ranking', 'partner_money_ranking', 'partner_number_ranking', 'partner_photo_ranking', 'partner_jewelry_ranking']);
        });
    }
}
